import UIKit
import RxSwift

open class TableViewConEx<T, HOLDER:IBCellHolder>: GroupTableViewConEx<T, HOLDER>, TableViewDelegate {

    override public final func getIBName(section: Int, row: Int) -> String {
        return getIBName(row: row);
    }

    override public final func initCellForRow(section: Int, row: Int, with holder: HOLDER) {
        initCellForRow(row: row, with: holder);
    }

    
    public override func getStyle() -> UITableViewStyle {
        return UITableViewStyle.plain
    }

    override open func refreshCellForRow(section: Int, row: Int, with holder: HOLDER) {
        refreshCellForRow(row: row, with: holder);
    }

    override open func didSelectRow(section: Int, row: Int) {
        didSelectRow(row: row);
    }

    override public final func onTap(section: Int, row: Int, v: UIView?) {

        onTap(row: row, v: v);
    }

    /**
     下面是delegate实现
     */

    open func getIBName(row: Int) -> String {
//        fatalError(ConstantsEx.kNoImpl);
        return String();
    }

    open func initCellForRow(row: Int, with holder: HOLDER) {
    }

    open func refreshCellForRow(row: Int, with holder: HOLDER) {
    }

    public final func setOnTapListener(row: Int, v: UIView?) {
        super.setOnTapListener(section: 0, row: row, v: v);
    }

    open func onTap(row: Int, v: UIView?) {
    }

    open func didSelectRow(row: Int) {
    }
    
    open func didSelect() {
        
    }
}
